﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Web.Core;
using Web.Prop;

namespace Web.UserControls
{
    public partial class UserProfile : System.Web.UI.UserControl
    {

        protected void Page_Load(object sender, EventArgs e)
        {
            lbUsername.Text = String.Format(@"{0} {1}", ((USER) Session["UserInfo"]).FNAME,
                                            ((USER) Session["UserInfo"]).LNAME);

            if (((USER) Session["UserInfo"]).AUTH.Equals((Int32)Authorize.Admin))
                lbType.Text = Authorize.Admin.ToString();

            if (((USER) Session["UserInfo"]).AUTH.Equals((Int32)Authorize.User))
                lbType.Text = Authorize.User.ToString();

            lbIP.Text = Request.ServerVariables["REMOTE_ADDR"];

        }
    }
}